package com.admin.cartAndOrder.pojo;

import lombok.Data;

import java.util.Arrays;
import java.util.Objects;

@Data
public class BatchDelete {
    private String name;
    private Integer[] ids;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;//判断是否是同一个对象
        if (o == null || getClass() != o.getClass()) return false;//判断是否为空和全限定路径名
        BatchDelete that = (BatchDelete) o;//向下转型后比较内容
        return Objects.equals(name, that.name) && Arrays.equals(ids, that.ids);//比较对象内容
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(name);
        result = 31 * result + Arrays.hashCode(ids);
        return result;
    }
}
